<#assign module="member"/>

<@override name="header">
</@override>
<@override name="body">

	<div class="row">

		<div class="col-xs-12">
			<div class="panel panel-default">
				<div class="panel-heading">
					新增客户等级
			    </div>
			    <div class="panel-body">
			
					<form class="form-horizontal" id="submit_form" action="#" method="post">
		                
		                <div class="form-group">
		                    <label class="col-sm-3 control-label"><em>*</em>名称：</label>    
		                   	<div class="col-sm-3">
		                   		<input class="form-control" id="name" name="name" type="text" required />
		                	</div>
		                </div>
		                <div class="form-group">
			                <label class="col-sm-3 control-label">所属公司:</label>
			                <div class="col-sm-3">
				                <select class="form-control" id="companyId" name="companyId">
									<#if companys??>
										<#list companys as company>
											<option value="${company.id}" <#if companyId?? && companyId==company.id>selected="selected"</#if>>${company.abbreviation?if_exists}</option>
										</#list>
									</#if>
								</select>
			                </div>
						 </div>
						 <div class="form-group">
		                    <label for="gender" class="col-sm-3 control-label"><em>*</em>设为默认等级：</label>
		                    <div class="col-sm-3">
			                    <div class="checkbox">
			                    	<label>
									  <input type="radio" name="defaultGrade" value="true" />默认
									</label>
									<label>
									  <input type="radio" name="defaultGrade" value="false" checked="checked"/>不默认
									</label>
								</div>
							</div>
		                </div>
		                <div class="form-group">
                            <label class="col-sm-3 control-label">并行订单量：</label>
                            <div class="col-sm-3">
                                <input class="form-control" id="parallelOrderNumber" name="parallelOrderNumber" type="number"/>
                            </div>
                        </div>
                        <p style="margin-left: 350px;color: red;">
                            订单未结束可继续下单的数量，不设置表示不限制
                        </p>
                        <p style="margin-left: 350px;color: red;">
                            最小为1设置数字不能小于“一次性下单最大数量”的设置
                        </p><br>
		                
		                
		                <div class="form-group">
		                    <label class="col-sm-3 control-label">一次性下单最大数量：</label>    
		                   	<div class="col-sm-3">
		                   		<input class="form-control" id="limitAmounts" name="limitAmounts" type="number" max="10"/>
		                	</div>
		                	<label class="control-label"><em>不填写则不限制</em></label>
		                </div>
		                
		                <@daijia>
		                <h4>代驾收费标准（不选择则订单公司上代驾收费为默认）</h4>
		                <hr/>
		                <div class="form-group">
		                    <label class="col-sm-3 control-label">代驾收费标准：</label>    
		                   	<div class="col-sm-3">
		                   		<select class="form-control" id="daijiaAreaId" name="daijiaAreaId">
			                    	<option value="">--请选择--</option>
			                    	<#list arealist as area>
		                    			<option value="${area.id}">${area.name?if_exists}</option>
									</#list>
			                    </select>
		                	</div>
		                </div>
		                </@daijia>
		                
		                <@zhuan>
			               <div class="form-group">
			                   	<div class="col-sm-3">
			                   	</div>
			                   	<div class="col-sm-9">
		                		 	<label class="control-label"><em>专车收费标准（不选择则使用专车类型上的收费标准）</em></label> 
				                	<ul class="nav nav-tabs" id="carTypeList" style="cursor:default;">
				                		<#if carTypes ??>
					                		<#list carTypes as c>
							            		<li><a href="#zhuanTab" data-toggle='tab'>${c.typeName?if_exists}</a></li>
							            	</#list>
						            	</#if>
						            </ul>
						        </div>
					       </div>
					       <div id="carType_div">
					       </div>
	                    </@zhuan>
		                <div class="form-group">
		                	<div class="col-sm-3">
		                	</div>
		                	<div class="col-sm-3">
				                <input id="submit_button" type="button" class="btn btn-primary" value="保存">
				                <input type="button" class="btn btn-default" onclick="window.location.href = '${ctx}/member/gradelist';" value="返回">
			            	</div>
			            </div>
		            </form>
				</div>
			</div>
						        	
		</div>
		
	</div>
	

</@override>
<@override name="footer">
<script type="text/javascript">
	window.daijia = {ctx : '${ctx}',companyId:'${companyId?if_exists}'};
	window.hasdaijia=false;
	<@shiro.isMainCompany>
	     hasdaijia=true;
	</@shiro.isMainCompany>
	window.haszhuanche=false;
	<@zhuan>
	     haszhuanche=true;
	</@zhuan>
</script>
<script src="${ctx}/assets/js/member/addgrade.js"></script>
</@override>
<@extends name="../layout.ftl"/>